﻿using System.Windows.Controls;
using System.Windows.Input;
using ParseControls;

namespace ParseOnlineAdmin
{
    /// <summary>
    /// Interaction logic for ParseRelatedTasks.xaml
    /// </summary>
    public partial class ParseRelatedTasks : UserControl
    {
        public ParseRelatedTasks()
        {
            InitializeComponent();
        }

        private void TextBox_KeyUp(object sender, KeyEventArgs e)
        {
            if (this.txtTask.Text != string.Empty)
            {
                if (e.Key == Key.Enter)
                {
                    string text = this.txtTask.Text;
                    ParseOne.InformationSending(new ParseCustomEventArgs("Task:New", parameter: text));

                    this.txtTask.Text = string.Empty;
                }
            }
        }
    }
}
